.class Lcom/waiqin365/h5/ui/a/b;
.super Ljava/lang/Object;

# interfaces
.implements Landroid/view/View$OnClickListener;


# instance fields
.field final synthetic a:Lcom/waiqin365/h5/ui/a/a;


# direct methods
.method constructor <init>(Lcom/waiqin365/h5/ui/a/a;)V
    .locals 0

    iput-object p1, p0, Lcom/waiqin365/h5/ui/a/b;->a:Lcom/waiqin365/h5/ui/a/a;

    invoke-direct {p0}, Ljava/lang/Object;-><init>()V

    return-void
.end method


# virtual methods
.method public onClick(Landroid/view/View;)V
    .locals 8

    const v7, 0x7f0805d3

    const/4 v6, 0x1

    const/4 v3, 0x0

    invoke-virtual {p1}, Landroid/view/View;->getTag()Ljava/lang/Object;

    move-result-object v0

    check-cast v0, Lcom/waiqin365/lightapp/kehu/share/a/a;

    iget-object v1, p0, Lcom/waiqin365/h5/ui/a/b;->a:Lcom/waiqin365/h5/ui/a/a;

    invoke-static {v1}, Lcom/waiqin365/h5/ui/a/a;->a(Lcom/waiqin365/h5/ui/a/a;)Lcom/waiqin365/h5/ui/a/d;

    move-result-object v1

    if-eqz v1, :cond_0

    iget-object v1, p0, Lcom/waiqin365/h5/ui/a/b;->a:Lcom/waiqin365/h5/ui/a/a;

    invoke-static {v1}, Lcom/waiqin365/h5/ui/a/a;->b(Lcom/waiqin365/h5/ui/a/a;)I

    move-result v1

    if-ne v1, v6, :cond_0

    iget v1, v0, Lcom/waiqin365/lightapp/kehu/share/a/a;->y:I

    const/16 v2, 0xd

    if-eq v1, v2, :cond_0

    invoke-virtual {v0, v6}, Lcom/waiqin365/lightapp/kehu/share/a/a;->a(Z)V

    iget-object v1, p0, Lcom/waiqin365/h5/ui/a/b;->a:Lcom/waiqin365/h5/ui/a/a;

    invoke-static {v1}, Lcom/waiqin365/h5/ui/a/a;->c(Lcom/waiqin365/h5/ui/a/a;)Ljava/util/List;

    move-result-object v1

    invoke-interface {v1}, Ljava/util/List;->clear()V

    iget-object v1, p0, Lcom/waiqin365/h5/ui/a/b;->a:Lcom/waiqin365/h5/ui/a/a;

    invoke-static {v1}, Lcom/waiqin365/h5/ui/a/a;->c(Lcom/waiqin365/h5/ui/a/a;)Ljava/util/List;

    move-result-object v1

    invoke-interface {v1, v0}, Ljava/util/List;->add(Ljava/lang/Object;)Z

    iget-object v1, p0, Lcom/waiqin365/h5/ui/a/b;->a:Lcom/waiqin365/h5/ui/a/a;

    invoke-static {v1}, Lcom/waiqin365/h5/ui/a/a;->a(Lcom/waiqin365/h5/ui/a/a;)Lcom/waiqin365/h5/ui/a/d;

    move-result-object v1

    invoke-interface {v1, v0}, Lcom/waiqin365/h5/ui/a/d;->a(Lcom/waiqin365/lightapp/kehu/share/a/a;)V

    :goto_0
    return-void

    :cond_0
    invoke-virtual {p1, v3}, Landroid/view/View;->setVisibility(I)V

    sget-object v1, Lcom/waiqin365/h5/ui/acty/TreeSingleSelectActy;->b:Landroid/widget/ListView;

    invoke-virtual {v1}, Landroid/widget/ListView;->getAdapter()Landroid/widget/ListAdapter;

    move-result-object v1

    check-cast v1, Lcom/waiqin365/h5/ui/a/a;

    invoke-virtual {v1}, Lcom/waiqin365/h5/ui/a/a;->a()Ljava/util/List;

    move-result-object v4

    new-instance v5, Ljava/util/ArrayList;

    invoke-direct {v5}, Ljava/util/ArrayList;-><init>()V

    move v2, v3

    :goto_1
    invoke-interface {v4}, Ljava/util/List;->size()I

    move-result v1

    if-ge v2, v1, :cond_3

    iget-object v1, p0, Lcom/waiqin365/h5/ui/a/b;->a:Lcom/waiqin365/h5/ui/a/a;

    invoke-static {v1}, Lcom/waiqin365/h5/ui/a/a;->d(Lcom/waiqin365/h5/ui/a/a;)Z

    move-result v1

    if-nez v1, :cond_2

    invoke-interface {v4, v2}, Ljava/util/List;->get(I)Ljava/lang/Object;

    move-result-object v1

    check-cast v1, Lcom/waiqin365/lightapp/kehu/share/a/a;

    iget-boolean v1, v1, Lcom/waiqin365/lightapp/kehu/share/a/a;->v:Z

    if-eqz v1, :cond_1

    invoke-interface {v4, v2}, Ljava/util/List;->get(I)Ljava/lang/Object;

    move-result-object v1

    invoke-interface {v5, v1}, Ljava/util/List;->add(Ljava/lang/Object;)Z

    :cond_1
    :goto_2
    add-int/lit8 v1, v2, 0x1

    move v2, v1

    goto :goto_1

    :cond_2
    invoke-interface {v4, v2}, Ljava/util/List;->get(I)Ljava/lang/Object;

    move-result-object v1

    invoke-interface {v5, v1}, Ljava/util/List;->add(Ljava/lang/Object;)Z

    goto :goto_2

    :cond_3
    invoke-interface {v5}, Ljava/util/List;->size()I

    move-result v1

    iget-object v2, p0, Lcom/waiqin365/h5/ui/a/b;->a:Lcom/waiqin365/h5/ui/a/a;

    invoke-static {v2}, Lcom/waiqin365/h5/ui/a/a;->b(Lcom/waiqin365/h5/ui/a/a;)I

    move-result v2

    if-lt v1, v2, :cond_4

    move-object v1, p1

    check-cast v1, Landroid/widget/CheckBox;

    invoke-virtual {v1}, Landroid/widget/CheckBox;->isChecked()Z

    move-result v1

    if-eqz v1, :cond_4

    check-cast p1, Landroid/widget/CheckBox;

    invoke-virtual {p1, v3}, Landroid/widget/CheckBox;->setChecked(Z)V

    iget-object v0, p0, Lcom/waiqin365/h5/ui/a/b;->a:Lcom/waiqin365/h5/ui/a/a;

    invoke-static {v0}, Lcom/waiqin365/h5/ui/a/a;->e(Lcom/waiqin365/h5/ui/a/a;)Landroid/content/Context;

    move-result-object v0

    iget-object v1, p0, Lcom/waiqin365/h5/ui/a/b;->a:Lcom/waiqin365/h5/ui/a/a;

    invoke-static {v1}, Lcom/waiqin365/h5/ui/a/a;->e(Lcom/waiqin365/h5/ui/a/a;)Landroid/content/Context;

    move-result-object v1

    const v2, 0x7f080561

    invoke-virtual {v1, v2}, Landroid/content/Context;->getString(I)Ljava/lang/String;

    move-result-object v1

    new-array v2, v6, [Ljava/lang/Object;

    iget-object v4, p0, Lcom/waiqin365/h5/ui/a/b;->a:Lcom/waiqin365/h5/ui/a/a;

    invoke-static {v4}, Lcom/waiqin365/h5/ui/a/a;->b(Lcom/waiqin365/h5/ui/a/a;)I

    move-result v4

    invoke-static {v4}, Ljava/lang/Integer;->valueOf(I)Ljava/lang/Integer;

    move-result-object v4

    aput-object v4, v2, v3

    invoke-static {v1, v2}, Ljava/lang/String;->format(Ljava/lang/String;[Ljava/lang/Object;)Ljava/lang/String;

    move-result-object v1

    invoke-static {v0, v1}, Lcom/waiqin365/lightapp/view/dk;->a(Landroid/content/Context;Ljava/lang/CharSequence;)V

    goto/16 :goto_0

    :cond_4
    iget-object v1, p0, Lcom/waiqin365/h5/ui/a/b;->a:Lcom/waiqin365/h5/ui/a/a;

    invoke-static {v1}, Lcom/waiqin365/h5/ui/a/a;->f(Lcom/waiqin365/h5/ui/a/a;)Z

    move-result v1

    if-eqz v1, :cond_6

    iget-object v2, p0, Lcom/waiqin365/h5/ui/a/b;->a:Lcom/waiqin365/h5/ui/a/a;

    move-object v1, p1

    check-cast v1, Landroid/widget/CheckBox;

    invoke-virtual {v1}, Landroid/widget/CheckBox;->isChecked()Z

    move-result v1

    invoke-static {v2, v0, v1}, Lcom/waiqin365/h5/ui/a/a;->a(Lcom/waiqin365/h5/ui/a/a;Lcom/waiqin365/lightapp/kehu/share/a/a;Z)V

    iget-object v1, p0, Lcom/waiqin365/h5/ui/a/b;->a:Lcom/waiqin365/h5/ui/a/a;

    check-cast p1, Landroid/widget/CheckBox;

    invoke-virtual {p1}, Landroid/widget/CheckBox;->isChecked()Z

    move-result v2

    invoke-static {v1, v0, v2}, Lcom/waiqin365/h5/ui/a/a;->b(Lcom/waiqin365/h5/ui/a/a;Lcom/waiqin365/lightapp/kehu/share/a/a;Z)V

    :goto_3
    iget-object v0, p0, Lcom/waiqin365/h5/ui/a/b;->a:Lcom/waiqin365/h5/ui/a/a;

    invoke-static {v0}, Lcom/waiqin365/h5/ui/a/a;->g(Lcom/waiqin365/h5/ui/a/a;)Lcom/waiqin365/h5/ui/a/a;

    move-result-object v0

    invoke-virtual {v0}, Lcom/waiqin365/h5/ui/a/a;->notifyDataSetChanged()V

    sget-object v0, Lcom/waiqin365/h5/ui/acty/TreeSingleSelectActy;->b:Landroid/widget/ListView;

    invoke-virtual {v0}, Landroid/widget/ListView;->getAdapter()Landroid/widget/ListAdapter;

    move-result-object v0

    check-cast v0, Lcom/waiqin365/h5/ui/a/a;

    invoke-virtual {v0}, Lcom/waiqin365/h5/ui/a/a;->a()Ljava/util/List;

    move-result-object v1

    new-instance v2, Ljava/util/ArrayList;

    invoke-direct {v2}, Ljava/util/ArrayList;-><init>()V

    :goto_4
    invoke-interface {v1}, Ljava/util/List;->size()I

    move-result v0

    if-ge v3, v0, :cond_8

    iget-object v0, p0, Lcom/waiqin365/h5/ui/a/b;->a:Lcom/waiqin365/h5/ui/a/a;

    invoke-static {v0}, Lcom/waiqin365/h5/ui/a/a;->d(Lcom/waiqin365/h5/ui/a/a;)Z

    move-result v0

    if-nez v0, :cond_7

    invoke-interface {v1, v3}, Ljava/util/List;->get(I)Ljava/lang/Object;

    move-result-object v0

    check-cast v0, Lcom/waiqin365/lightapp/kehu/share/a/a;

    iget-boolean v0, v0, Lcom/waiqin365/lightapp/kehu/share/a/a;->v:Z

    if-eqz v0, :cond_5

    invoke-interface {v1, v3}, Ljava/util/List;->get(I)Ljava/lang/Object;

    move-result-object v0

    invoke-interface {v2, v0}, Ljava/util/List;->add(Ljava/lang/Object;)Z

    :cond_5
    :goto_5
    add-int/lit8 v3, v3, 0x1

    goto :goto_4

    :cond_6
    check-cast p1, Landroid/widget/CheckBox;

    invoke-virtual {p1}, Landroid/widget/CheckBox;->isChecked()Z

    move-result v1

    invoke-virtual {v0, v1}, Lcom/waiqin365/lightapp/kehu/share/a/a;->a(Z)V

    goto :goto_3

    :cond_7
    invoke-interface {v1, v3}, Ljava/util/List;->get(I)Ljava/lang/Object;

    move-result-object v0

    invoke-interface {v2, v0}, Ljava/util/List;->add(Ljava/lang/Object;)Z

    goto :goto_5

    :cond_8
    invoke-interface {v2}, Ljava/util/List;->size()I

    move-result v0

    if-nez v0, :cond_9

    sget-object v0, Lcom/waiqin365/h5/ui/acty/TreeSingleSelectActy;->a:Landroid/widget/TextView;

    iget-object v1, p0, Lcom/waiqin365/h5/ui/a/b;->a:Lcom/waiqin365/h5/ui/a/a;

    invoke-static {v1}, Lcom/waiqin365/h5/ui/a/a;->e(Lcom/waiqin365/h5/ui/a/a;)Landroid/content/Context;

    move-result-object v1

    invoke-virtual {v1, v7}, Landroid/content/Context;->getString(I)Ljava/lang/String;

    move-result-object v1

    invoke-virtual {v0, v1}, Landroid/widget/TextView;->setText(Ljava/lang/CharSequence;)V

    sget-object v0, Lcom/waiqin365/h5/ui/acty/TreeSingleSelectActy;->a:Landroid/widget/TextView;

    const-string/jumbo v1, "#999999"

    invoke-static {v1}, Landroid/graphics/Color;->parseColor(Ljava/lang/String;)I

    move-result v1

    invoke-virtual {v0, v1}, Landroid/widget/TextView;->setTextColor(I)V

    sget-object v0, Lcom/waiqin365/h5/ui/acty/TreeSingleSelectActy;->a:Landroid/widget/TextView;

    const v1, 0x7f02011c

    invoke-virtual {v0, v1}, Landroid/widget/TextView;->setBackgroundResource(I)V

    goto/16 :goto_0

    :cond_9
    sget-object v0, Lcom/waiqin365/h5/ui/acty/TreeSingleSelectActy;->a:Landroid/widget/TextView;

    new-instance v1, Ljava/lang/StringBuilder;

    invoke-direct {v1}, Ljava/lang/StringBuilder;-><init>()V

    iget-object v3, p0, Lcom/waiqin365/h5/ui/a/b;->a:Lcom/waiqin365/h5/ui/a/a;

    invoke-static {v3}, Lcom/waiqin365/h5/ui/a/a;->e(Lcom/waiqin365/h5/ui/a/a;)Landroid/content/Context;

    move-result-object v3

    invoke-virtual {v3, v7}, Landroid/content/Context;->getString(I)Ljava/lang/String;

    move-result-object v3

    invoke-virtual {v1, v3}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder;

    move-result-object v1

    const-string/jumbo v3, "("

    invoke-virtual {v1, v3}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder;

    move-result-object v1

    invoke-interface {v2}, Ljava/util/List;->size()I

    move-result v2

    invoke-virtual {v1, v2}, Ljava/lang/StringBuilder;->append(I)Ljava/lang/StringBuilder;

    move-result-object v1

    const-string/jumbo v2, ")"

    invoke-virtual {v1, v2}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder;

    move-result-object v1

    invoke-virtual {v1}, Ljava/lang/StringBuilder;->toString()Ljava/lang/String;

    move-result-object v1

    invoke-virtual {v0, v1}, Landroid/widget/TextView;->setText(Ljava/lang/CharSequence;)V

    sget-object v0, Lcom/waiqin365/h5/ui/acty/TreeSingleSelectActy;->a:Landroid/widget/TextView;

    const/4 v1, -0x1

    invoke-virtual {v0, v1}, Landroid/widget/TextView;->setTextColor(I)V

    sget-object v0, Lcom/waiqin365/h5/ui/acty/TreeSingleSelectActy;->a:Landroid/widget/TextView;

    const v1, 0x7f02011d

    invoke-virtual {v0, v1}, Landroid/widget/TextView;->setBackgroundResource(I)V

    goto/16 :goto_0
.end method
